{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Quanlse trapped ion\n",
    "*Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.*\n",
    "\n",
    "## Outline\n",
    "\n",
    "This tutorial will demonstrate how to implement the single-qubit gate and Mølmer-Sørensen gate operation in trapped ion quantum computing by using Quanlse. The outline of this tutorial is as follows:\n",
    "\n",
    "- Introduction\n",
    "- Preparation\n",
    "- Single qubit gate rotating around X/Y axis\n",
    "- Introduction to Mølmer-Sørensen gate in trapped ion quantum computing\n",
    "- Construct pulse sequences of Mølmer-Sørensen gate\n",
    "- Summary\n",
    "- Reference"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction\n",
    "\n",
    "The trapped ion remains one of the earliest quantum computing platforms. In recent years, significant progress has been achieved in the trapped ion quantum control technology. Compared to other quantum hardware platforms such as superconducting quantum computing, the trapped ion quantum computing platform has several advantages. Firstly, the qubit units in trapped-ion are identical particles, which ensure the same qubit frequency. Secondly, the single/two-qubit gates have excellent fidelity, which can achieve 99.9999% and 99.9% with coherence time longer than 1-hour \\[1\\]. Thirdly, benefitted from the Coulomb interactions between trapped ions, qubits can realize all-to-all connections \\[2\\].\n",
    "\n",
    "In trapped ion quantum computing, the qubit unit is a single ion trapped by external binding potential, and the individual qubit operation is implemented using an additional control field. Different from superconducting quantum computing, which usually uses microwave as the driving field, gates in trapped ion system are usually driven by laser \\[3\\]. We can use a Raman processing to transform the internal state transition as shown in figure(a-b), and realize the required quantum operations. Based on this, we develop the QuanlseIon-Trap, users can quickly obtain the laser pulse sequences in trapped ion quantum computing using QuanlseIon-Trap.\n",
    "\n",
    "**Raman transition and the effective Hamiltonian**\n",
    "\n",
    "We choose the two hyperfine states of ion to be $|0\\rangle$ and $|1\\rangle$ state. Because of the electric dipole confinement, to couple the $|0\\rangle$ and $|1\\rangle$ state, we need to apply a two-photons Ramam transition, which includes a highly excited state $|e\\rangle$ , as we show in figure(a-b).\n",
    "\n",
    "![Raman](figures/Raman-en.png)\n",
    "\n",
    "By using rotating wave approximation(RWA) and adiabatic elimination, we can derive the effective Hamiltonian of two photons Raman transition while eliminating the influence of excited state $|e\\rangle$:\n",
    "$$\n",
    "\\hat{H}_{\\rm eff}=\\frac{ \\Omega(t)}{2}\\left(\\hat{\\sigma}_{+} e^{i\\Delta\\phi}+\\hat{\\sigma}_{-} e^{-i\\Delta\\phi}\\right),\n",
    "$$\n",
    "\n",
    "where $\\hat{\\sigma}_+=\\frac{1}{2}(\\hat{\\sigma}_x+i\\hat{\\sigma}_y)，\\hat{\\sigma}_-=\\frac{1}{2}(\\hat{\\sigma}_x-i\\hat{\\sigma}_y)$，$\\hat{\\sigma}_x, \\hat{\\sigma}_y$ are Pauli matrice. $\\Delta\\phi=\\phi_1-\\phi_0$ denote the relative phase of two laser beams implemented on the trapped ion, the Rabi frequency $\\Omega(t)$ is proportional to the product of two laser amplitude $\\Omega(t)\\propto E_1(t)\\cdot E_0(t)$. The Raman laser used in the laboratory usually has property $|E_1|=|E_0|$. In trapped ion quantum control, the laser parameter can be described by $(E,\\omega,\\phi)$. Usually, restricted to the laser construction, we fix the frequency $\\omega$ and relative phase $\\Delta\\phi$ at the initial time, and operate the qubits by adjusting the amplitude of laser. On account of the linear relation between amplitude and Rabi frequency, the quantum control parameter we refer to is the Rabi frequency $\\Omega(t)$."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Single qubit rotating gate in trapped ion**\n",
    "\n",
    "The rotating gate matrix which can be achieved directly is:\n",
    "\n",
    "$$\n",
    "R(\\theta,\\Delta\\phi) = \\begin{bmatrix} \n",
    "\\cos \\frac{\\theta} { 2 } & -\\mathrm{i} \\mathrm{e}^{\\mathrm{i} \\Delta\\phi} \\sin \\frac{\\theta} { 2 } \\\\\n",
    "-\\mathrm{ie}^{-\\mathrm{i} \\Delta\\phi} \\sin \\frac{\\theta} { 2 } & \\cos \\frac{\\theta} { 2 }   \n",
    "\\end{bmatrix}.\n",
    "$$\n",
    "\n",
    "When we choose the relative phase $\\Delta\\phi=0$, it corresponds to a rotating gate around X-axis.\n",
    "\n",
    "$$\n",
    "R_x(\\theta)=\\begin{bmatrix} \n",
    "\\cos \\frac{\\theta} { 2 } &  -i \\sin \\frac{\\theta} { 2 } \\\\\n",
    "-i \\sin \\frac{\\theta} { 2 } & \\cos \\frac{\\theta} { 2 } \n",
    "\\end{bmatrix}.\n",
    "$$\n",
    "\n",
    "While if we choose $\\Delta\\phi=-\\pi/2$, it corresponds to a rotating gate around Y-axis.\n",
    "\n",
    "$$\n",
    "R_y(\\theta)=\\begin{bmatrix} \n",
    "\\cos \\frac{\\theta} { 2 } &  - \\sin \\frac{\\theta} { 2 } \\\\\n",
    " \\sin \\frac{\\theta} { 2 } & \\cos \\frac{\\theta} { 2 } \n",
    "\\end{bmatrix}.\n",
    "$$\n",
    "\n",
    "We will show how to realize single/two-qubit gates in a trapped ion system in the following sections."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Preparation\n",
    "\n",
    "First of all, after sucessful installation of Quansle, users need to import required package from Quanlse and certain Python libraries:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import math\n",
    "from math import pi\n",
    "\n",
    "from Quanlse.Utils.Hamiltonian import plotWaves, getUnitary\n",
    "from Quanlse.remoteOptimizer import remoteIonOptimize1Qubit as runIonOptimize1Qubit"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To use Quanlse Cloud Service, the users can get a token from http://quantum-hub.baidu.com and submit the job onto Quanlse's server. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from Quanlse import Define\n",
    "\n",
    "Define.hubToken = \"\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Single rotating gate around X/Y-axis\n",
    "\n",
    "**Rotating gate around X-axis**\n",
    "\n",
    "First of all, we need to define the necessary parameters of the single-qubit in trapped ion, including the rotation `axis`, rotating angle `theta`, and gate time `tgate`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Choose the rotating axis, where we have ionRx and ionRy\n",
    "axis = \"ionRx\"\n",
    "\n",
    "# The rotating angle\n",
    "theta = pi/3\n",
    "\n",
    "# The gate time with units microsecond\n",
    "tgate = 2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Input the defined parameters, and running function `runIonOptimize1Qubit()`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "ham, infid = runIonOptimize1Qubit(axis,\n",
    "                                  theta,\n",
    "                                  tgate)\n",
    "print(infid)\n",
    "print(getUnitary(ham))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can obtain the Hamiltonian pulse information `ham` required to generate a gate rotating $\\theta$ around X-axis, including the gate infidelity `infid`, real gate unitary matrix by using function `getUnitary()`. Note that the real gate differs from the target gate by a global phase $e^{i\\phi}$.\n",
    "\n",
    "Via the `plotWaves()` function:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "plotWaves(ham, xUnit=f'$\\mu$s', yUnit='Rabi frequency \\n (a.u)')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "we can visualize the generated laser pulses sequences."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Rotating gate around Y-axis**\n",
    "\n",
    "Similarly, by setting the parameters as follows, we can obtain the rotating gate around Y-axis:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Choose the Y rotating axis\n",
    "axis = \"ionRy\"\n",
    "\n",
    "# The rotating angle\n",
    "theta = pi/2\n",
    "\n",
    "# The gate time with units microsecond\n",
    "tgate = 2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Using function `runIonOptimize1Qubit()`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "ham, infid = runIonOptimize1Qubit(axis,\n",
    "                                  theta,\n",
    "                                  tgate)\n",
    "print(infid)\n",
    "print(getUnitary(ham))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can also obtain the Hamiltonian pulse information `ham` required to generate a gate rotating $\\theta$ around Y-axis. Via the `plotWaves()` function, we can visualize the generated laser pulses sequences."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "plotWaves(ham, xUnit=f'$\\mu$s', yUnit='Rabi frequency \\n (a.u)')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "When we select different rotating axis, the channels of laser implemented in effective Hamiltonian will change. Select the $X$ axis, the laser pulse is implemented on $\\hat\\sigma_x$, select $Y$ axis, the laser pulse is implemented on $\\hat\\sigma_y$."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction to Mølmer-Sørensen gate in trapped ion quantum computing\n",
    "\n",
    "To realize universal quantum computing, in addition to the single-qubit rotating gate, it is also necessary to achieve the two entanglement qubits gate. We introduce the native two qubits gate - Mølmer-Sørensen gate in trapped ion quantum computing, show the principle of Mølmer-Sørensen gate and how to generate corresponding pulses by Quanlse \\[4\\].\n",
    "\n",
    "**Principle of Mølmer-Sørensen gate**\n",
    "\n",
    "![Raman](figures/MSgate-en.png)\n",
    "\n",
    "In trapped ion quantum computing, two qubits transmit information through the collective vibrational phonon mode of the ion chain. Under the action of four laser beams, the effective Hamiltonian of the system can be written as:\n",
    "\n",
    "$$\n",
    "\\hat{H}_{\\rm M S}= \\hbar \\sum_{j=\\{m,n\\}} \\Omega_{j}(t) \\hat{{\\sigma}}_{x}^{j}\\sum_{k=1}^{N}\\eta_{j,k}e^{i\\mu t}\\left(\\hat{a}_k e^{-i \\omega_{k} t}+\\hat{a}_k^{\\dagger} e^{i \\omega_{k} t}\\right)+h\\cdot c,\n",
    "$$\n",
    "\n",
    "where $j,k$ denote the ion and phonon indexs, $\\{m,n\\}$ is the ion position implemented by laser. $N$ denotes the total ion number, which also represents the phonon number in the ion chain. $\\mu$ denotes the laser detuning, which is related to the gate time through $\\mu=2\\pi/t_g$. $\\hat{\\sigma}_x^j$ is the $j$th ion Pauli matrix, $\\hat a_k^\\dagger,\\hat a_k$ denote the $k$th phonon creation and annihilation operation. $\\Omega_j$ are the pulse sequences that need to be optimized, usually we have $\\Omega_m(t)=\\Omega_n(t)$. $\\eta_{j,k}$ is the Lamb-Dicke parameters of phonon mode, $\\omega_k$ represents the vibration frequency of phonons. For convenience, we set $\\hbar=1$ in the following sections."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**From Hamiltonian $\\hat{H}_{\\rm MS}$ to unitary operation $U$**\n",
    "\n",
    "The vital parameters $\\{\\eta_{j,k},\\omega_k\\}$ in effective Hamiltonian is related to the trapped potential $V(x,y,z)=\\frac{1}{2}\\omega_z^2 z^2-\\frac{1}{2}\\omega_{xy}^2(x^2+y^2)$ and total ion number $N$ in the chain. In 1-dimensional ion chain, we need to make sure $\\omega_z \\ll \\omega_{xy}$ and the Lamb-Dicke parameter $\\eta_{j,k}\\ll 1$, so that the time-dependent evolution of effective Hamiltonian can be expanded to the 2-order of Magnus formula：\n",
    "\n",
    "$$\n",
    "U(t_g)=\\exp \\left[-i\\sum_{j=\\{m,n\\}}\\hat{\\sigma}_{x}^{j}\\sum_{k=1}^{N}\\left(\\alpha_{j, k}(t_g) \\hat{a}_{k}^{\\dagger}-\\alpha_{j, k}^{*}(t_g) \\hat{a}_{k}\\right) +i\\chi_{m,n}(t_g)\\hat{\\sigma}_{x}^{m}\\hat{\\sigma}_{x}^{n}+O(\\eta^3)\\right],\n",
    "$$\n",
    "\n",
    "where $\\alpha_{j, k}(t_g)=\\int_0^{t_g} dt f(\\eta_{k,j},\\Omega_j(t),\\omega_k)$，$\\chi_{m,n}(t_g)=\\int_0^{t_g} dt\\int_0^{t} dt_1 g(\\eta_{k,j},\\Omega_m(t), \\Omega_n(t_1), \\omega_k)$. \n",
    "\n",
    "The integral functions $\\{f,g\\}$ are strongly related to laser pulse. We can set the pulse $\\Omega_j(t)$ to be a square pulse sequence $[A_1,A_2,\\cdots,A_{n_{2N+1}}]$ ($A_n$ is the $n$th sequence amplitude）or Fourier-sine basis $\\Omega_j(t)=\\sum_{n=1}^{2N+1}A_n \\sin(2\\pi n t/t_g)$. By adjusting agrument $A_n$ in pulse $\\Omega_j(t)$, we can obtain the pulse sequence $\\Omega_j(t)$ which makes $\\alpha_{j, k}(t_g)=0,\\chi_{m,n}(t_g)=\\frac{\\pi}{4}$，and finally construct the Mølmer-Sørensen gate:\n",
    "\n",
    "$$\n",
    "{\\rm MS}=U(t_g)=e^{i\\frac{\\pi}{4}\\hat{\\sigma}_x^m\\otimes\\hat{\\sigma}_x^n}=\\frac{1}{\\sqrt{2}}\\left(\\begin{array}{cccc}\n",
    "1 & 0 & 0 & i \\\\\n",
    "0 & 1 & i & 0 \\\\\n",
    "0 & i & 1 & 0 \\\\\n",
    "i & 0 & 0 & 1\n",
    "\\end{array}\\right).\n",
    "$$\n",
    "\n",
    "Where Mølmer-Sørensen gate can be constructed with some local unitary gates and CNOT gate in quantum computing, the effective quantum circuits are as follow:\n",
    "\n",
    "![MSgate](figures/MS-CNOT.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Construct pulse sequences of Mølmer-Sørensen gate\n",
    "\n",
    "To construct the pulse sequences of the Mølmer-Sørensen gate in the ion trap quantum computing system, we need to import the related package from Quanlse:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import Molmer-Sorensen gate ion optimizer module\n",
    "from Quanlse.remoteOptimizer import remoteIonMS as runIonMS\n",
    "\n",
    "from Quanlse.Utils import Plot"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Firstly, we need to define the necessary information of qubit in ion trap, including the number of ion in chain which usually less than 30, the type (mass) of the ion, the horizontal and vertical binding potential of the trapped potential, and the vibration phonon mode that users choose to transmit quantum information:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set ion number in the trapped potential which usually less than 30\n",
    "ionNumber = 6\n",
    "\n",
    "# Set atom mass or atom species in the trapped potential\n",
    "atomMass = 171\n",
    "\n",
    "# Set trapped potential parameter\n",
    "omegaZ = 2 * pi * 0.2e6\n",
    "omegaXY = 2 * pi * 2e6\n",
    "\n",
    "# Choose transverse or axial phonon mode\n",
    "phononMode = \"transverse\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Secondly, to perform Mølmer-Sørensen gate operation on two ions, we specify the two ions' indexs, the gate duration time `tgate`, as well as the laser pulse waveform that the users want to choose (we support square wave `squareWave` and Fourier-sine basis `sinWave`)："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set operating ion indices\n",
    "ionM = 0\n",
    "ionN = 2\n",
    "\n",
    "# Set the gate time\n",
    "tgate=200\n",
    "\n",
    "# Choose the pulse waveform, where we support squareWave and sinWave\n",
    "pulseWave = \"squareWave\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "By using `runIonMS()` function, and input the trapped ion argruments above:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "res, unitary = runIonMS(ionNumber=ionNumber,\n",
    "                        atomMass=atomMass,\n",
    "                        tgate=tgate,\n",
    "                        omega=(omegaXY, omegaZ),\n",
    "                        ionIndex=(ionM, ionN),\n",
    "                        pulseWave=pulseWave,\n",
    "                        phononMode=phononMode)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We activated the calculation results, where the `res` contains the position information of the qubit in the trapped ion quantum system, collective vibration phonon mode frequency, system Lamb-Dicke coefficient matrix, formation of the Mølmer-Sørensen gate pulse sequence, and the gate infidelity. `unitary` represent the real gate corresponding to the pulse. Users can easily print out these related results through the following commands:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(f\"The trapped ion axial phonon mode frequencys are:\\n {res['phonon_freq']}\\n\")\n",
    "print(f\"The trapped ion axial Lamb-Dicke parameters are:\\n {res['lamb_dicke']}\\n\")\n",
    "print(f\"infidelity is: {res['infidelity']}\\n\")\n",
    "print(unitary)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "At the same time, the position of the qubit can be visualized by calling the `Plot.plotIonPosition()` drawing module:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "Plot.plotIonPosition(res['ion_pos'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And we can plot the pulse sequences which form the Mølmer-Sørensen gate by using `Plot.plotPulse()`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "Plot.plotPulse([res['time']], [res['omega']],\n",
    "                title=['Square pulse for Mølmer-Sørensen gate in trapped ion'],\n",
    "                xLabel=r'Time ($\\mu$s)', yLabel=['Rabi frequency (a.u)'], color=['blue'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In addition to the square wave pulse commonly used in experiments, Quanlse also supports the Fourier-sine wave pulse. Similarly, we can obtain the pulse information related to the Mølmer-Sørensen gate formed by the Fourier-sine wave:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Choose the pulse waveform, where we support squareWave and sinWave\n",
    "pulseWave = \"sinWave\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "res, unitary = runIonMS(ionNumber=ionNumber,\n",
    "                        atomMass=atomMass,\n",
    "                        tgate=tgate,\n",
    "                        omega=(omegaXY, omegaZ),\n",
    "                        ionIndex=(ionM, ionN),\n",
    "                        pulseWave=pulseWave,\n",
    "                        phononMode=phononMode)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Users can easily print information such as the qubits position and the parameters of the system Hamiltonian through the following commands:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(f\"The trapped ion axial phonon mode frequencys are:\\n {res['phonon_freq']}\\n\")\n",
    "print(f\"The trapped ion axial Lamb-Dicke parameters are:\\n {res['lamb_dicke']}\\n\")\n",
    "print(f\"infidelity is: {res['infidelity']}\\n\")\n",
    "print(unitary)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "At the same time, the qubits' position can be visualized by calling the `Plot.plotIonPosition()` drawing module:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "Plot.plotIonPosition(res['ion_pos'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And plot the Fourier-sine pulse sequences forming the Mølmer-Sørensen gate by using `Plot.plotPulse()`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "Plot.plotPulse([res['time']], [res['omega']],\n",
    "                title=['Sin pulse for Mølmer-Sørensen gate in trapped ion'],\n",
    "                xLabel=r'Time ($\\mu$s)', yLabel=['Rabi frequency (a.u)'], color=['blue'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In conclusion, through Quanlse `runIonMS()` module, we obtain the corresponding phonon vibration frequency in one-dimensional trapped ion, the Lamb-Dicke coefficient in ion chain, the actual pulse generated gate infidelity and real Mølmer-Sørensen gate. Simultaneously, the Quanlse module has a built-in plotting module, which allows users to visualize the corresponding position of each qubit and pulse sequences of the Mølmer-Sørensen gate easily."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Summary\n",
    "\n",
    "Using Quanlse, we can quickly restore the Hamiltonian parameter information of the 1-dimensional ion chain, including the ion position calibration information, the phonon vibration mode, the Lamb-Dicke parameters, and the pulse waveform of single rotating gate or Mølmer-Sørensen gate. Users can click on the link [tutorial-iontrap.ipynb](https://github.com/baidu/Quanlse/tree/master/Tutorial/EN/tutorial-trapped-ion-gate.ipynb) jump to Jupyter Notebook document of the corresponding GitHub page to obtain the relevant code.\n",
    "\n",
    "We encourage users to try different parameters, and explore the further function of the QuanlseIon-Trap module."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Reference\n",
    "\\[1\\] [Wright, K., et al. \"Benchmarking an 11-qubit quantum computer.\" Nature communications 10.1 (2019): 1-6.](https://www.nature.com/articles/s41467-019-13534-2)\n",
    "\n",
    "\\[2\\] [Bruzewicz, Colin D., et al. \"Trapped-ion quantum computing: Progress and challenges.\" Applied Physics Reviews 6.2 (2019): 021314.](https://aip.scitation.org/doi/abs/10.1063/1.5088164)\n",
    "\n",
    "\\[3\\] [Häffner, Hartmut, Christian F. Roos, and Rainer Blatt. \"Quantum computing with trapped ions.\" Physics reports 469.4 (2008): 155-203.](https://www.sciencedirect.com/science/article/abs/pii/S0370157308003463)\n",
    "\n",
    "\\[4\\] [Sørensen, Anders, and Klaus Mølmer. \"Quantum computation with ions in thermal motion.\" Physical review letters 82.9 (1999): 1971.](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.82.1971)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:Quanlse]",
   "language": "python",
   "name": "quanlse"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}